/**
 * Created with IntelliJ IDEA.
 * Description:二叉树
 * User: Admin
 * Date: 2022-05-17
 * Time: 18:46
 */
public class Main {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        System.out.println(binaryTree.isCompleteTree(root));

    }
    public static void main8(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.levelOrder(root);
    }
    public static void main7(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        BinaryTree.TreeNode node =binaryTree.find(root,'H');
        System.out.println(node.val);
    }
    public static void main6(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        int ret = binaryTree.getHeight(root);
        System.out.println(ret);
    }
    public static void main5(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        int ret = binaryTree.getKLevelNodeCount(root,4);
        System.out.println(ret);
    }
    public static void main4(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.getLeafNodeCount1(root);
        System.out.println(binaryTree.Tree);
    }
    public static void main3(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        int ret = binaryTree.getLeafNodeCount(root);
        System.out.println(ret);
    }
    public static void main2(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.size(root);
        System.out.println(binaryTree.TreeSize);
        int ret = binaryTree.size1(root);
        System.out.println(ret);
    }
    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrde(root);
    }
}
